package com.umeox.moto.mqtt;

import android.content.Context;


import com.umeox.moto.mqtt.base.INet;
import com.umeox.moto.mqtt.base.PersistentConnectState;
import com.umeox.moto.mqtt.base.PersistentInitParams;
import com.umeox.moto.mqtt.event.IOnSubscribeListener;
import com.umeox.moto.mqtt.event.IOnSubscribeRpcListener;

import org.eclipse.paho.client.mqttv3.IMqttActionListener;
import org.eclipse.paho.client.mqttv3.MqttException;

public interface IPersisitentNet extends INet {
    void init(Context context, PersistentInitParams params) throws MqttException;

    void destroy();

    void disConnectManually(IMqttActionListener listener);

    PersistentConnectState getConnectState();

    void subscribe(String topic, IOnSubscribeListener listener);

    void unSubscribe(String topic, IOnSubscribeListener listener);

    void subscribeRpc(String topic, IOnSubscribeRpcListener listener);

    void unSubscribeRpc(String topic, IOnSubscribeRpcListener listener);

}
